#include "StdAfx.h"
#include "Server.h"
using namespace GSE;
#define new new(_NORMAL_BLOCK,__FILE__,__LINE__);
CServer::CServer(void)
{
}


CServer::~CServer(void)
{
}

void CServer::Init()
{
	m_bShutdown = false;
	m_lpMgr = NULL;
	m_lpListener =  INet::InstancePtr()->CreateListener();
}

void CServer::Listen(const char * strIP,const char * strPort)
{
	m_lpListener->AsyncListen(strIP,strPort);
}

void CServer::Uninit()
{
	m_lpListener->SetSessionManager(NULL);
	INet::InstancePtr()->DestroyListener(m_lpListener);
	delete m_lpMgr;
}